﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using WLYT.Application.Interfaces;
using WLYT.Domain.ApiModel;
using Newtonsoft.Json;
using WLYT.Admin.WebApi.Component;
using Newtonsoft.Json.Converters;

namespace WLYT.Admin.WebApi.Controllers
{
    /// <summary>
    /// 上游WMS接口
    /// </summary>
    [AllowAnonymous]
    public class WMSController : ApiController
    {
        [HttpPost]
        public ApiResult Post([FromBody] ApiParam apiParam)
        {
            try
            {
                return new WebApiInvoke().Invoke(apiParam);
            }
            catch (Exception ex)
            {
                ApiResult apiResult = new ApiResult() { Code = 1, Message = "WMS：" + ex.Message, Data = ex.Message };
                return apiResult;
            }
        }

    }
}